﻿using System.Collections.Generic;

namespace JinYuan.MES.Models
{
    /// <summary>
    /// 执行结果
    /// </summary>
    public class MesResponse
    {
        /// <summary>
        /// 错误代码  错误代码，成功不返回
        /// </summary>
        public string code { get; set; }
        /// <summary> 
        /// 数据处理消息  成功不返回
        /// </summary>
        public string message { get; set; }
        /// <summary>
        /// 报错消息类型
        /// </summary>
        public string category { get; set; }
        /// <summary>
        /// 成功标识 false失败 true 成功
        /// </summary>
        public bool success { get; set; }
    }



    /// <summary>
    /// 单个上传（只上传条码，不上传卷芯码）
    /// </summary>
    public class MesResponseSingle
    {
        /// <summary>
        /// 
        /// </summary>
        public string code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string message { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public bool success { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string category { get; set; }
    }




    #region 进站反馈
    public class MesResponseIn
    {
        /// <summary>
        /// 错误代码  错误代码，成功不返回
        /// </summary>
        public string code { get; set; }
        /// <summary> 
        /// 数据处理消息  成功不返回
        /// </summary>
        public string message { get; set; }
        /// <summary>
        /// 报错消息类型
        /// </summary>
        public string category { get; set; }
        /// <summary>
        /// 成功标识 false失败 true 成功
        /// </summary>
        public bool success { get; set; }
    }
    public class RowsItemIn
    {
        /// <summary>
        /// 错误代码  错误代码，成功不返回
        /// </summary>
        public string code { get; set; }
        /// <summary>
        /// 返回条码成功标识 false失败 true 成功
        /// </summary>
        public bool success { get; set; }
        /// <summary>
        /// 数据处理消息  成功不返回
        /// </summary>
        public string message { get; set; }
        /// <summary>
        /// 返回成品条码
        /// </summary>
        public string identification { get; set; }
        /// <summary>
        /// 返回的容器码
        /// </summary>
        public string containerCode { get; set; }
        /// <summary>
        /// 报错消息类型 A=停线，B=排出，C=忽略（需警示）
        /// </summary>
        public string category { get; set; }
    }
    #endregion


    #region 出站反馈  
    //{"rows":[{"code":null,"success":true,"message":null,"identification":"InsertAt20231218095755934","containerCode":null,"category":null}],"success":true,"total":1}
    public class MesResponseOut
    {
        /// <summary>
        /// 返回参数
        /// </summary>
        public List<RowsItemOut> rows { get; set; }
        /// <summary>
        /// MES信息返回成功标识 false失败 true 成功
        /// </summary>
        public bool success { get; set; }
        /// <summary>
        /// 返回参数条数
        /// </summary>
        public int total { get; set; }
    }
    public class RowsItemOut
    {
        /// <summary>
        /// 错误代码  错误代码，成功不返回
        /// </summary>
        public string code { get; set; }
        /// <summary>
        /// 返回条码成功标识 false失败 true 成功
        /// </summary>
        public bool success { get; set; }
        /// <summary>
        /// 数据处理消息  成功不返回
        /// </summary>
        public string message { get; set; }
        /// <summary>
        /// 返回成品条码
        /// </summary>
        public string identification { get; set; }
        /// <summary>
        /// 返回的容器码
        /// </summary>
        public string containerCode { get; set; }
        /// <summary>
        /// 报错消息类型 A=停线，B=排出，C=忽略（需警示）
        /// </summary>
        public string category { get; set; }
    }
    #endregion

    /// <summary>
    /// 执行结果Entity，带返回值
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class RequestResult<T> : MesResponse
    {
        public T Result { get; set; }
    }


    /// <summary>
    /// 执行结果List，带返回值
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class RequestResultList<T> : MesResponse
    {
        public List<T> Result { get; set; }
    }

    public class MesGradingResponse : MesResponse
    {


        /// <summary>
        /// 报错消息类型  A=停线，B=排出，C=忽略（需警示）
        /// </summary>
        public string category { get; set; }


        /// <summary>
        /// 条码及档位结果信息
        /// </summary>
        public List<rowsListItem> rows { get; set; }


       
    }
    public class rowsListItem
    {
        /// <summary>
        /// 电池条码
        /// </summary>
        public string identification { get; set; }
        /// <summary>
        /// 电池等级
        /// </summary>
        public string level { get; set; }
        /// <summary>
        /// 电池挡位
        /// </summary>
        public string rank { get; set; }

        public object passage { get; set; }
        public object message { get; set; }
        /// <summary>
        /// 分档方案
        /// </summary>
        public  string sortingScheme { get; set; }
    }
}
